import { post, get, download } from '@/http/request'

/**
 * 设备类别分页查询
 * @param {*} params
 * @returns
 */
export const deviceTypePageList = params => {
    return post({
        url: '/water/deviceType/pageList',
        params
    })
}

/**
 * 设备类别不带分页查询
 * @param {*} params
 * @returns
 */
export function deviceTypeListAll(params) {
    return post({
        url: '/water/deviceType/listAll',
        params
    })
}

/**
 * 获取已经授权的列表
 * @param {*} params
 * @returns
 */
export function getAuthDevice(params) {
    return get({
        url: '/water/area/info/getAuthDevice',
        params
    })
}
/**
 * 设备类别新增数据
 * @param {*} params
 * @returns
 */
export const deviceTypeAdd = params => {
    return post({
        url: '/water/deviceType/save',
        params
    })
}

/**
 * 设备类别修改数据
 * @param {*} params
 * @returns
 */
export const deviceTypeUpdate = params => {
    return post({
        url: '/water/deviceType/update',
        params
    })
}

/**
 * 设备类别删除数据
 * @param {*} params
 * @returns
 */
export const deviceTypeDel = params => {
    return post({
        url: '/water/deviceType/delete',
        params
    })
}

/**
 * 导出数据
 * @param {*} params
 * @returns
 */
export const exportExcel = params => {
    return download({
        url: '/water/deviceType/exportExcel',
        params
    })
}

/**
 * 导出数据
 * @param {*} params
 * @returns
 */
export const importExcel = params => {
    return download({
        url: '/water/deviceType/exportExcel',
        params
    })
}

/**
 * 模板下载
 * @param {*} params
 * @returns
 */
export const downloadDeviceTemplate = params => {
    return download({
        url: '/water/deviceType/downloadTemplate',
        params
    })
}
